package com.jzo2o.customer.controller.worker;

import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditAddReqDTO;
import com.jzo2o.customer.model.dto.response.WorkerCertificationAuditResDTO;
import com.jzo2o.customer.service.IWorkerCertificationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 服务端认证相关接口
 *
 **/
@RestController("WorkerCertificationAuditController")
@RequestMapping("/worker/worker-certification-audit")
public class WorkerCertificationAuditController {
    @Autowired
    private IWorkerCertificationService workerCertificationAuditService;

    /**
     * 提交认证申请
     * 接口路径：POST  /customer/worker/worker-certification-audit
     * 请求数据类型: application/json
     */
    @PostMapping
    public void submitCertificationAudit(@RequestBody WorkerCertificationAuditAddReqDTO dto) {
        workerCertificationAuditService.submitCertificationAudit(dto);
    }
    /**
     * 查询最新的驳回原因
     * 接口路径：GET   /customer/worker/worker-certification-audit/rejectReason
     * 请求数据类型： application/x-www-form-urlencoded
     * 请求参数：无
     */
    @GetMapping("/rejectReason")
    public WorkerCertificationAuditResDTO showRejectReason(){
        return workerCertificationAuditService.showRejectReason();
    }
}
